home *** CD-ROM | disk | FTP | other *** search
/ comtecelectrical.ca / www.comtecelectrical.ca.tar / www.comtecelectrical.ca / infobots / Backup / MSOCache / All Users / 90000409-6000-11D3-8CFE-0150048383C9 / Q2561411.CAB / POWERPNT.EXE / RCDATA / 5888 next >
Text File  |  2003-07-30  |  4KB  |  135 lines

  1.  
  2. function MakeSldVis() 
  3. {
  4.     var fTrans=g_showAnimation && SldHasTrans()
  5.     if( fTrans )    
  6.     {
  7.         if( g_bgSound ) {
  8.             idx=g_bgSound.indexOf(",");
  9.             pptSound.src=g_bgSound.substr( 0, idx );
  10.             pptSound.loop= -(parseInt(g_bgSound.substr(idx+1)));
  11.         }
  12.         SlideObj.filters.revealtrans.Apply()    
  13.     }
  14.     SlideObj.style.visibility="visible"
  15.     if( fTrans )
  16.         SlideObj.filters.revealtrans.Play()
  17. }
  18. function MakeNotesVis() 
  19. {
  20.     if( !IsNts() ) return false 
  21.     SlideObj.style.display="none"
  22.     nObj = document.all.item("NotesObj")
  23.     parent.SetHasNts(0)
  24.     if( nObj ) { 
  25.         nObj.style.display=""
  26.         parent.SetHasNts(1)
  27.     }
  28.     return 1
  29. }
  30. function ChkAutoAdv()
  31. {
  32.     if(SldHasTrans())
  33.         SlideObj.onfilterchange=AutoAdv
  34.     else
  35.         AutoAdv()
  36. }
  37. function AutoAdv()
  38. {
  39.     if(!IsWin("PPTSld") || !gUseSldTimings )return
  40.     var sld=GetCurSld()
  41.     if( (sld.mAdvDelay>0) && !parent.IsFramesMode() )
  42.         setTimeout("parent.GoToNextSld()",sld.mAdvDelay)
  43. }
  44. function GetObj(id)
  45. {
  46.     if(g_supportsPPTHTML) return document.all(id);
  47.     else return document.getElementById(id);
  48. }
  49. function SldHasTrans() { return SlideObj.style.filter != ""; }
  50. function GetSldId() { return sId=location.href.substring(location.href.lastIndexOf('/')+1) }
  51. function HideMenu() { if( frames["PPTSld"] && PPTSld.document.all.item("ctxtmenu") && PPTSld.ctxtmenu.style.display!="none" ) { PPTSld.ctxtmenu.style.display='none'; return true } return false }
  52. function IsWin( name ) { return window.name == name }
  53. function IsNts() { return IsWin("PPTNts") }
  54. function IsSldOrNts() { return( IsWin("PPTSld")||IsWin("PPTNts") ) }
  55. function SupportsPPTAnimation() { return( navigator.platform == "Win32" && navigator.appVersion.indexOf("Windows")>0 ) }
  56. function SupportsPPTHTML()
  57. {
  58.     var appVer=navigator.appVersion, msie=appVer.indexOf("MSIE "), ver=0
  59.     if( msie >= 0 )
  60.         ver=parseFloat( appVer.substring( msie+5, appVer.indexOf(";",msie) ) )
  61.     else
  62.         ver=parseInt(appVer)
  63.  
  64.     return( ver >= 4 && msie >= 0 )
  65. }
  66. function _RSW()
  67. {
  68.     if( !g_supportsPPTHTML || IsNts() ||
  69.       ( !g_scaleInFrame && (!IsWin("PPTSld") || !parent.IsFullScrMode()) ) )
  70.         return
  71.  
  72.         var padding=0;
  73.         if( IsWin("PPTSld") && parent.IsFramesMode() ) padding=6
  74.  
  75.     cltWidth=document.body.clientWidth-padding
  76.     cltHeight=document.body.clientHeight-padding
  77.     factor=(1.0*cltWidth)/g_origW
  78.     if( cltHeight < g_origH*factor )
  79.         factor=(1.0*cltHeight)/g_origH
  80.  
  81.     newSize = g_origSz * factor
  82.     if( newSize < 1 ) newSize=1
  83.  
  84.     s=SlideObj.style
  85.     s.fontSize=newSize+"px"
  86.     s.posWidth=g_origW*factor
  87.     s.posHeight=g_origH*factor
  88.     s.posLeft=(cltWidth-s.posWidth+padding)/2
  89.     s.posTop=(cltHeight-s.posHeight+padding)/2
  90.  
  91.     if( g_scaleHyperlinks )
  92.         ScaleHyperlinks( factor )
  93. }
  94. function _InitAnimations()
  95. {
  96.     animRuntimeInstalled = ''+document.body.localTime != 'undefined';
  97.     isFullScreen = (window.name == "PPTSld") && !parent.IsFramesMode();
  98.     g_animUseRuntime = g_showAnimation && animRuntimeInstalled && !(isFullScreen && parent.IsSldVisited());
  99.     if( g_animUseRuntime ) {
  100.         collSeq = document.all.tags("seq");
  101.         if( collSeq != null ) {
  102.             for(ii=0;ii<collSeq.length;ii++) {
  103.                 if( collSeq[ii].getAttribute( "p:nodeType" ) == "mainSeq" ) {
  104.                     g_animMainSequence = collSeq[ii];
  105.                     break;
  106.                 }
  107.             }
  108.         }
  109.     
  110.         if( g_animItemsToHide && document.body.playAnimations != false ) {
  111.             for(jj = 0; jj < g_animItemsToHide.length; jj++) {
  112.                 if( hideObj = GetObj(g_animItemsToHide[jj]) )
  113.                     hideObj.runtimeStyle.visibility="hidden";
  114.             }
  115.         }
  116.  
  117.         if( g_animInteractiveItems ){
  118.             for(jj = 0; jj < g_animInteractiveItems.length; jj++) {
  119.                 if( triggerObj = GetObj(g_animInteractiveItems[jj]) )
  120.                     triggerObj.runtimeStyle.cursor="hand";
  121.             }
  122.         }
  123.         
  124.         if( gUseSldTimings && ''+g_animSlideTime != 'undefined' ) {
  125.             adjustedTime = document.body.calculateAutoAdvanceTimes( g_animSlideTime, g_animEffectTimings );
  126.             if( IsWin("PPTSld") && adjustedTime != g_animSlideTime ) {
  127.                var sld = GetCurSld();
  128.                sld.mAdvDelay = adjustedTime * 1000;
  129.             }
  130.         }
  131.     }
  132.  
  133.     return g_animUseRuntime;
  134. }
  135.